home *** CD-ROM | disk | FTP | other *** search
/ Workbench Design / WB Collection.iso / workbench werkzeuge / icon tools / doicon16 / install-doicon < prev    next >
Text File  |  1996-04-07  |  5KB  |  230 lines

  1. ; $VER: DoIcon-Install 1.6 (08.09.95)
  2. ; Install script for DoIcon © 1994-1995 by Lars 'SFX' Eilebrecht
  3.  
  4. (set app_name "DoIcon")
  5.  
  6. (set version "1.6")
  7.  
  8. (set vers_name (cat app_name " v" version))
  9.  
  10. (set bad-kick "You must be using Kickstart 2.04+ to install DoIcon")
  11.  
  12. (set install-msg
  13.   (cat
  14.     "\n\nWelcome to the DoIcon installation utility.\n\n"
  15.     "This program lets you install DoIcon on your Amiga.\n\n"
  16.     "Please read the documentation before using DoIcon.\n\n"
  17.     "Copyright © 1994-1995 by Lars Eilebrecht."
  18.   )
  19. )
  20.  
  21. (set exit_msg "\nDon't forget to read the documentation!\n\nHave a nice day...")
  22.  
  23. (set copying "Copying ")
  24.  
  25. (set were-doicon "Where would you like to install the Doicon-executable?")
  26.  
  27. (set help-were-doicon "You should place DoIcon in an directory which is in your search path, C: for example.")
  28.  
  29. (set install-guide "Would you like to install any DoIcon guides?")
  30.  
  31. (set help-were-guide
  32.   (cat
  33.     "    DoIcon.guide is the documentation for DoIcon in the special "
  34.     "AmigaGuide® hypertext format. You need a program like AmigaGuide or "
  35.     "MultiView to view it properly."
  36.   )
  37. )
  38.  
  39. (set which-guides "\n Which guides should be installed?")
  40.  
  41. (set which-language "\nWhich languages should be installed?")
  42.  
  43. (set which-language-help
  44.   (cat
  45.     "    The Amiga can be operated in many different languages. If you "
  46.     "want DoIcon to use the same language as the Amiga Workbench "
  47.     "then a catalog file must be copied to your harddisk for each "
  48.     "language supported.\n"
  49.     "    To reduce the amount of space consumed by the language files, "
  50.     "you can select to have only the files of specific languages "
  51.     "copied.\n"
  52.     "    Simply check the boxes of the languages you wish to have "
  53.     "available on your system.\n"
  54.     "(Please note that the english language is builtin) "
  55.   )
  56. )
  57.  
  58. (transcript (cat "Installing " vers_name " ..."))
  59.  
  60. ; Check Kickstart version. Exit if not at least 2.0
  61.  
  62. (if (< (/ (getversion) 65536) 37)
  63.   (abort bad-kick)
  64. )
  65.  
  66. (message install-msg)
  67.  
  68. (complete 0)
  69.  
  70. ; Copy DoIcon
  71.  
  72. (set destination
  73.   (askdir
  74.     (prompt  were-doicon)
  75.     (help    (cat help-were-doicon "\n\n" @askdir-help))
  76.     (default "c:")
  77.   )
  78. )
  79.  
  80. (set @default-dest destination)
  81.  
  82. (copyfiles
  83.   (prompt "Copying DoIcon...")
  84.   (confirm)
  85.   (source app_name)
  86.   (dest destination)
  87.   (help @copyfiles-help)
  88. )
  89.  
  90. (complete 30)
  91.  
  92. ; Copy guide
  93.  
  94. (if
  95.   (askbool
  96.     (prompt (cat "\n" install-guide))
  97.     (help   help-were-guide)
  98.   )
  99.  
  100.   (
  101.  
  102.     (set guidelang
  103.       (askoptions
  104.         (prompt which-guides)
  105.         (help   (cat help-were-guide "\n\n\n" @askoptions-help))
  106.         (choices
  107.           "Deutsch"
  108.           "English"
  109.         )
  110.         (default "English")
  111.       )
  112.     )
  113.   
  114.     (set n 0)
  115.  
  116.     (while
  117.       (set language
  118.         (select n
  119.           "Deutsch"
  120.           "English"
  121.           ""
  122.         )
  123.       )
  124.  
  125.       (if (IN guidelang n)
  126.             (
  127.  
  128.      (set destination
  129.       (askdir
  130.         (prompt  (cat "Select a place for the following guide: " language))
  131.         (help    (cat help-were-guide "\n\n" @askdir-help))
  132.         (default "Help:")
  133.       )
  134.     )
  135.  
  136.               (set guidesource (cat "Docs/" language  "/DoIcon.guide"))
  137.  
  138.               (set guidedestination destination)
  139.  
  140.               (if (exists guidesource)
  141.                 (
  142.                   (copyfiles
  143.                     (prompt (cat copying "DoIcon.guide..."))
  144.                     (confirm)
  145.                     (source guidesource)
  146.                     (dest guidedestination)
  147.                     (infos)
  148.                     (help @copyfiles-help)
  149.                   )
  150.                 )
  151.               )
  152.             )
  153.           )
  154.  
  155.         (set n (+ n 1))
  156.       )
  157.     )
  158. )
  159.  
  160. (complete 70)
  161.  
  162. ; Copy catalog files
  163.  
  164. (if (= (exists "Locale:") 2)
  165.   (
  166.     (set lang
  167.       (askoptions
  168.         (prompt which-language)
  169.         (help   (cat which-language-help "\n\n" @askoptions-help))
  170.         (choices
  171.           "English"
  172.           "Deutsch"
  173.           "Suomi"
  174.           "Français"
  175.           "Dansk"
  176.           "Polski"
  177.         )
  178.         (default 1)
  179.       )
  180.     )
  181.  
  182.  
  183.     (set n 0)
  184.  
  185.     (while
  186.       (set language
  187.         (select n
  188.           "English"
  189.           "Deutsch"
  190.           "Suomi"
  191.           "Français"
  192.           "Dansk"
  193.           "Polski"
  194.           ""
  195.         )
  196.       )
  197.  
  198.       (
  199.         (if (IN lang n)
  200.           (if (<> 0 n)   ; skip english
  201.             (
  202.               (set catalogs (tackon "Locale" language))
  203.  
  204.               (set destination (tackon "Locale:Catalogs" language))
  205.  
  206.               (if (exists (tackon catalogs "DoIcon.catalog"))
  207.                 (copyfiles
  208.                   (prompt "Copying catalogs...")
  209.                   (confirm)
  210.                   (source (tackon catalogs "DoIcon.catalog"))
  211.                   (dest destination)
  212.                   (help @copyfiles-help)
  213.                 )
  214.               )
  215.             )
  216.           )
  217.         )
  218.  
  219.       )
  220.       (set n (+ n 1))
  221.     )
  222.   )
  223. )
  224.  
  225. (complete 100)
  226.  
  227. (exit exit_msg)
  228.  
  229. ; End of Installer script
  230.